<template>
  <a-drawer
    :title="title"
    placement="right"
    :closable="true"
    :width="width"
    :visible="visible"
    @close="onClose"
    destroyOnClose
  >
    <a-tabs type="card" @change="callback">
      <a-tab-pane key="1" tab="基本信息">
        <basic-information ref="basicInformation" :record="model"></basic-information>
      </a-tab-pane>
      <a-tab-pane key="2" tab="修改记录">
        <update-record ref="systemInfo" :record="model"></update-record>
      </a-tab-pane>
    </a-tabs>
  </a-drawer>
</template>

<script>

  import basicInformation from './tab/basicInformation'
  import updateRecord from './tab/updateRecord'

  export default {
    name: "workInfoDetailModal",
    components:{
      basicInformation,updateRecord,
    },
    data() {
      return {
        visible: false,
        title: "",
        model:{},
        width: '100%'
      }
    },
    methods: {
      callback(key) {
        //console.log(key);
      },
      showDrawer(record) {
        this.visible = true;
        this.model = record;
      },
      onClose() {
        this.visible = false;
      },
    }
  }
</script>

<style scoped>

</style>